xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE,
shared_info_frame)) == 0 )
goto error_out;
- memset(shared_info, 0, sizeof(shared_info_t));
+ memset(shared_info, 0, PAGE_SIZE);
/* Mask all upcalls... */
for ( i = 0; i < MAX_VIRT_CPUS; i++ )
shared_info->vcpu_info[i].evtchn_upcall_mask = 1;
xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, shared_info_frame);
printf("shared_info = %p, err=%s frame=%lx\n",
shared_info, strerror (errno), shared_info_frame);
- //memset(shared_info, 0, sizeof(shared_info_t));
+ //memset(shared_info, 0, PAGE_SIZE);
/* Mask all upcalls... */
for ( i = 0; i < MAX_VIRT_CPUS; i++ )
shared_info->vcpu_info[i].evtchn_upcall_mask = 1;
/* shared_info page starts its life empty. */
shared_info = xc_map_foreign_range(
xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, shared_info_frame);
- memset(shared_info, 0, sizeof(shared_info_t));
+ memset(shared_info, 0, PAGE_SIZE);
/* Mask all upcalls... */
for ( i = 0; i < MAX_VIRT_CPUS; i++ )
shared_info->vcpu_info[i].evtchn_upcall_mask = 1;
/* Copy saved contents of shared-info page. No checking needed. */
page = xc_map_foreign_range(
xc_handle, dom, PAGE_SIZE, PROT_WRITE, shared_info_frame);
- memcpy(page, shared_info, sizeof(shared_info_t));
+ memcpy(page, shared_info, PAGE_SIZE);
munmap(page, PAGE_SIZE);
/* Uncanonicalise the pfn-to-mfn table frame-number list. */
/* Interrupt vector for event channel. */
int evtchn_vector;
+
+ uint64_t pad[32];
};
typedef struct arch_shared_info arch_shared_info_t;
DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
struct arch_shared_info {
+ uint64_t pad[32];
};
struct arch_vcpu_info {
/* Frame containing list of mfns containing list of mfns containing p2m. */
xen_pfn_t pfn_to_mfn_frame_list_list;
unsigned long nmi_reason;
+ uint64_t pad[32];
};
typedef struct arch_shared_info arch_shared_info_t;
/* Frame containing list of mfns containing list of mfns containing p2m. */
xen_pfn_t pfn_to_mfn_frame_list_list;
unsigned long nmi_reason;
+ uint64_t pad[32];
};
typedef struct arch_shared_info arch_shared_info_t;
/*
* Xen/kernel shared data -- pointer provided in start_info.
- * NB. We expect that this struct is smaller than a page.
+ *
+ * This structure is defined to be both smaller than a page, and the
+ * only data on the shared page, but may vary in actual size even within
+ * compatible Xen versions; guests should not rely on the size
+ * of this structure remaining constant.
*/
struct shared_info {
struct vcpu_info vcpu_info[MAX_VIRT_CPUS];